#!/bin/sh

# 加载工具类
. /etc/idnewnil/utils.sh

# 配置frp
uci set frpc.common.server_addr=$(getstr '.frpc.server_addr')
uci set frpc.common.token=$(getstr '.frpc.token')
uci set frpc.common.login_fail_exit='false'
uci set frpc.ssh.use_encryption='false'
uci set frpc.ssh.use_compression='false'
uci set frpc.ssh.remote_port='2201'
uci set frpc.http=conf
uci set frpc.http.type='tcp'
uci set frpc.http.use_encryption='true'
uci set frpc.http.use_compression='false'
uci set frpc.http.local_ip='127.0.0.1'
uci set frpc.http.local_port='80'
uci set frpc.http.remote_port='80'
uci set frpc.http1=conf
uci set frpc.http1.type='tcp'
uci set frpc.http1.use_encryption='true'
uci set frpc.http1.use_compression='false'
uci set frpc.http1.local_ip='127.0.0.1'
uci set frpc.http1.local_port='80'
uci set frpc.http1.remote_port='8001'
uci set frpc.https=conf
uci set frpc.https.type='tcp'
uci set frpc.https.use_encryption='false'
uci set frpc.https.use_compression='false'
uci set frpc.https.local_ip='127.0.0.1'
uci set frpc.https.local_port='443'
uci set frpc.https.remote_port='443'
uci set frpc.https1=conf
uci set frpc.https1.type='tcp'
uci set frpc.https1.use_encryption='false'
uci set frpc.https1.use_compression='false'
uci set frpc.https1.local_ip='127.0.0.1'
uci set frpc.https1.local_port='443'
uci set frpc.https1.remote_port='4431'
uci commit frpc
